﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public void MapKUNDFORM(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveKUNDFORM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryKUNDFORM(dwData, 1);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapKUNDFORM(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertKUNDFORM(dwLocal);
            }
            UpdateKUNDFORM(dwLocal);
        }
        public void InsertKUNDFORM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            or1 = OracleDB.CreateCommand();
            DataSet result = new DataSet();
            or1.CommandText = "INSERT INTO KUNDFORM(KDFMANDANT, KDFFORMART, KDFVB, KDFVG, KDFLAND, KDFKUNDNR, KDFADRSL, KDFPROGRP, KDFARTGRP, KDFPOSTYP, KDFVERSART, KDFTAX, KDFAKKRED, KDFLO, KDFZESSION, KDFETIKETT, KDFSERIE, KDFPRAEFIX, KDFLGLFDNR, KDFPRUEFART, KDFPRFELDLG1, KDFPRFELDKZ1, KDFPRFELDLG2, KDFPRFELDKZ2, KDFPRFELDLG3, KDFPRFELDKZ3, KDFPRFELDLG4, KDFPRFELDKZ4, KDFPRFELDLG5, KDFPRFELDKZ5, KDFANZOK1, KDFKUNDNROK1, KDFADROK1, KDFRUN1, KDFFSATZ1, KDFMAIL1, KDFMAILTXT1, KDFDR1, KDFFORM1, KDFFORMULAR1, KDFPROGRAMM1, KDFFOLGEKZ1, KDFUSERGR1, KDFADRFKZ1, KDFSPRKZ1, KDFANZOK2, KDFKUNDNROK2, KDFADROK2, KDFRUN2, KDFFSATZ2, KDFMAIL2, KDFMAILTXT2, KDFDR2, KDFFORM2, KDFFORMULAR2, KDFPROGRAMM2, KDFFOLGEKZ2, KDFUSERGR2, KDFADRFKZ2, KDFSPRKZ2, KDFANZOK3, KDFKUNDNROK3, KDFADROK3, KDFRUN3, KDFFSATZ3, KDFMAIL3, KDFMAILTXT3, KDFDR3, KDFFORM3, KDFFORMULAR3, KDFPROGRAMM3, KDFFOLGEKZ3, KDFUSERGR3, KDFADRFKZ3, KDFSPRKZ3, KDFANZOK4, KDFKUNDNROK4, KDFADROK4, KDFRUN4, KDFFSATZ4, KDFMAIL4, KDFMAILTXT4, KDFDR4, KDFFORM4, KDFFORMULAR4, KDFPROGRAMM4, KDFFOLGEKZ4, KDFUSERGR4, KDFADRFKZ4, KDFSPRKZ4, KDFANZOK5, KDFKUNDNROK5, KDFADROK5, KDFRUN5, KDFFSATZ5, KDFMAIL5, KDFMAILTXT5, KDFDR5, KDFFORM5, KDFFORMULAR5, KDFPROGRAMM5, KDFFOLGEKZ5, KDFUSERGR5, KDFADRFKZ5, KDFSPRKZ5, KDFANZOK6, KDFKUNDNROK6, KDFADROK6, KDFRUN6, KDFFSATZ6, KDFMAIL6, KDFMAILTXT6, KDFDR6, KDFFORM6, KDFFORMULAR6, KDFPROGRAMM6, KDFFOLGEKZ6, KDFUSERGR6, KDFADRFKZ6, KDFSPRKZ6, KDFANZOK7, KDFKUNDNROK7, KDFADROK7, KDFRUN7, KDFFSATZ7, KDFMAIL7, KDFMAILTXT7, KDFDR7, KDFFORM7, KDFFORMULAR7, KDFPROGRAMM7, KDFFOLGEKZ7, KDFUSERGR7, KDFADRFKZ7, KDFSPRKZ7, KDFANZOK8, KDFKUNDNROK8, KDFADROK8, KDFRUN8, KDFFSATZ8, KDFMAIL8, KDFMAILTXT8, KDFDR8, KDFFORM8, KDFFORMULAR8, KDFPROGRAMM8, KDFFOLGEKZ8, KDFUSERGR8, KDFADRFKZ8, KDFSPRKZ8, KDFANZOK9, KDFKUNDNROK9, KDFADROK9, KDFRUN9, KDFFSATZ9, KDFMAIL9, KDFMAILTXT9, KDFDR9, KDFFORM9, KDFFORMULAR9, KDFPROGRAMM9, KDFFOLGEKZ9, KDFUSERGR9, KDFADRFKZ9, KDFSPRKZ9, KDFOPRDR, KDFDBLATT, KDFDRPARAM, KDFLAYOUT, KDFDRPARAMB, KDFSERIELS, KDFFILLER, KDFAENZL, KDFAENB, KDFAEND, KDFNEUB, KDFNEUD)"
                + " VALUES (:KDFMANDANT, :KDFFORMART, '   ', '   ', '   ', :KDFKUNDNR, '        ', '   ', '   ', '   ', '   ', '   ', ' ', '  ', ' ', '        ', '        ', '                    ', 0, ' ', 0, ' ', 0, ' ', 0, ' ', 0, ' ', 0, ' ', '01', '        ', '        ', '01', 'O', '  ', '   ', '  ', '        ',:KDFFORMULAR1, :KDFPROGRAMM1, '  ', '  ', '  ', '  ', '01', '        ', '        ', '01', 'O', '  ', '   ', '  ', '        ', :KDFFORMULAR2,:KDFPROGRAMM2, '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', '00', '        ', '        ', '00', ' ', '  ', '   ', '  ', '        ', '        ', '        ', '  ', '  ', '  ', '  ', ' ', ' ', '     ', '        ', '          ', '  ', '      ', 0, '        ', 0, 'INTEXE  ', 20140415)";
            or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
            or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
            or1.Parameters.Add("KDFKUNDNR", OracleType.NVarChar).Value = dwData["KDFKUNDNR"].ToString();
            or1.Parameters.Add("KDFFORMULAR1", OracleType.NVarChar).Value = dwData["KDFFORMULAR1"].ToString();
            or1.Parameters.Add("KDFPROGRAMM1", OracleType.NVarChar).Value = dwData["KDFPROGRAMM1"].ToString();
            or1.Parameters.Add("KDFFORMULAR2", OracleType.NVarChar).Value = dwData["KDFFORMULAR2"].ToString();
            or1.Parameters.Add("KDFPROGRAMM2", OracleType.NVarChar).Value = dwData["KDFPROGRAMM2"].ToString();
            Connect2Proxy(or1);
        }
        public DataSet QueryKUNDFORM(DataRow dwData, int option = 1)
        {
            DataSet Return = new DataSet();
            DataTable tbLocal = null;
            DataSet Result = new DataSet();
             
                or1 = OracleDB.CreateCommand();
                switch (option)
                {
                    case 0:
                        or1.CommandText = "SELECT * FROM KUNDFORM WHERE  ROWNUM<2 ";
                        break;
                    case 1:
                        or1.CommandText = "SELECT * FROM KUNDFORM WHERE  "
                            + "  KDFMANDANT=:KDFMANDANT AND KDFPROGRAMM1=:KDFPROGRAMM1  AND KDFKUNDNR=:KDFKUNDNR AND KDFFORMART=:KDFFORMART";
                        or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
                        or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
                        or1.Parameters.Add("KDFKUNDNR", OracleType.NVarChar).Value = dwData["KDFKUNDNR"].ToString();
                        or1.Parameters.Add("KDFPROGRAMM1", OracleType.NVarChar).Value = dwData["KDFPROGRAMM1"].ToString();
                        break;
                    case 2:
                        or1.CommandText = "SELECT KDKUNDNA,F.* FROM KUNDFORM F LEFT JOIN KDSTAMM ON KDFMANDANT=KDMANDANT AND  KDFKUNDNR=KDKUNDNR WHERE  "
                            + "  KDFMANDANT=:KDFMANDANT AND KDFFORMART=:KDFFORMART"
                            +" ORDER BY KDKUNDNA";
                        or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
                        or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
                        break;
                }
                Result = Connect2Proxy(or1);
                if (Result.Tables.Count > 0)
                {
                    tbLocal = Result.Tables[0];
                    tbLocal.TableName = "KUNDFORM";
                }
                Return.Merge(Result);
          
            return Return;
        }
        public void UpdateKUNDFORM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();

            #region====Command====
            or1.CommandText = "UPDATE KUNDFORM SET "
                    + "KDFMANDANT=:KDFMANDANT,"
                    + "KDFFORMART=:KDFFORMART,"
                    + "KDFVB=:KDFVB,"
                    + "KDFVG=:KDFVG,"
                    + "KDFLAND=:KDFLAND,"
                    + "KDFKUNDNR=:KDFKUNDNR,"
                    + "KDFADRSL=:KDFADRSL,"
                    + "KDFPROGRP=:KDFPROGRP,"
                    + "KDFARTGRP=:KDFARTGRP,"
                    + "KDFPOSTYP=:KDFPOSTYP,"
                    + "KDFVERSART=:KDFVERSART,"
                    + "KDFTAX=:KDFTAX,"
                    + "KDFAKKRED=:KDFAKKRED,"
                    + "KDFLO=:KDFLO,"
                    + "KDFZESSION=:KDFZESSION,"
                    + "KDFETIKETT=:KDFETIKETT,"
                    + "KDFSERIE=:KDFSERIE,"
                    + "KDFPRAEFIX=:KDFPRAEFIX,"
                    + "KDFLGLFDNR=:KDFLGLFDNR,"
                    + "KDFPRUEFART=:KDFPRUEFART,"
                    + "KDFPRFELDLG1=:KDFPRFELDLG1,"
                    + "KDFPRFELDKZ1=:KDFPRFELDKZ1,"
                    + "KDFPRFELDLG2=:KDFPRFELDLG2,"
                    + "KDFPRFELDKZ2=:KDFPRFELDKZ2,"
                    + "KDFPRFELDLG3=:KDFPRFELDLG3,"
                    + "KDFPRFELDKZ3=:KDFPRFELDKZ3,"
                    + "KDFPRFELDLG4=:KDFPRFELDLG4,"
                    + "KDFPRFELDKZ4=:KDFPRFELDKZ4,"
                    + "KDFPRFELDLG5=:KDFPRFELDLG5,"
                    + "KDFPRFELDKZ5=:KDFPRFELDKZ5,"
                    + "KDFANZOK1=:KDFANZOK1,"
                    + "KDFKUNDNROK1=:KDFKUNDNROK1,"
                    + "KDFADROK1=:KDFADROK1,"
                    + "KDFRUN1=:KDFRUN1,"
                    + "KDFFSATZ1=:KDFFSATZ1,"
                    + "KDFMAIL1=:KDFMAIL1,"
                    + "KDFMAILTXT1=:KDFMAILTXT1,"
                    + "KDFDR1=:KDFDR1,"
                    + "KDFFORM1=:KDFFORM1,"
                    + "KDFFORMULAR1=:KDFFORMULAR1,"
                    + "KDFPROGRAMM1=:KDFPROGRAMM1,"
                    + "KDFFOLGEKZ1=:KDFFOLGEKZ1,"
                    + "KDFUSERGR1=:KDFUSERGR1,"
                    + "KDFADRFKZ1=:KDFADRFKZ1,"
                    + "KDFSPRKZ1=:KDFSPRKZ1,"
                    + "KDFANZOK2=:KDFANZOK2,"
                    + "KDFKUNDNROK2=:KDFKUNDNROK2,"
                    + "KDFADROK2=:KDFADROK2,"
                    + "KDFRUN2=:KDFRUN2,"
                    + "KDFFSATZ2=:KDFFSATZ2,"
                    + "KDFMAIL2=:KDFMAIL2,"
                    + "KDFMAILTXT2=:KDFMAILTXT2,"
                    + "KDFDR2=:KDFDR2,"
                    + "KDFFORM2=:KDFFORM2,"
                    + "KDFFORMULAR2=:KDFFORMULAR2,"
                    + "KDFPROGRAMM2=:KDFPROGRAMM2,"
                    + "KDFFOLGEKZ2=:KDFFOLGEKZ2,"
                    + "KDFUSERGR2=:KDFUSERGR2,"
                    + "KDFADRFKZ2=:KDFADRFKZ2,"
                    + "KDFSPRKZ2=:KDFSPRKZ2,"
                    + "KDFANZOK3=:KDFANZOK3,"
                    + "KDFKUNDNROK3=:KDFKUNDNROK3,"
                    + "KDFADROK3=:KDFADROK3,"
                    + "KDFRUN3=:KDFRUN3,"
                    + "KDFFSATZ3=:KDFFSATZ3,"
                    + "KDFMAIL3=:KDFMAIL3,"
                    + "KDFMAILTXT3=:KDFMAILTXT3,"
                    + "KDFDR3=:KDFDR3,"
                    + "KDFFORM3=:KDFFORM3,"
                    + "KDFFORMULAR3=:KDFFORMULAR3,"
                    + "KDFPROGRAMM3=:KDFPROGRAMM3,"
                    + "KDFFOLGEKZ3=:KDFFOLGEKZ3,"
                    + "KDFUSERGR3=:KDFUSERGR3,"
                    + "KDFADRFKZ3=:KDFADRFKZ3,"
                    + "KDFSPRKZ3=:KDFSPRKZ3,"
                    + "KDFANZOK4=:KDFANZOK4,"
                    + "KDFKUNDNROK4=:KDFKUNDNROK4,"
                    + "KDFADROK4=:KDFADROK4,"
                    + "KDFRUN4=:KDFRUN4,"
                    + "KDFFSATZ4=:KDFFSATZ4,"
                    + "KDFMAIL4=:KDFMAIL4,"
                    + "KDFMAILTXT4=:KDFMAILTXT4,"
                    + "KDFDR4=:KDFDR4,"
                    + "KDFFORM4=:KDFFORM4,"
                    + "KDFFORMULAR4=:KDFFORMULAR4,"
                    + "KDFPROGRAMM4=:KDFPROGRAMM4,"
                    + "KDFFOLGEKZ4=:KDFFOLGEKZ4,"
                    + "KDFUSERGR4=:KDFUSERGR4,"
                    + "KDFADRFKZ4=:KDFADRFKZ4,"
                    + "KDFSPRKZ4=:KDFSPRKZ4,"
                    + "KDFANZOK5=:KDFANZOK5,"
                    + "KDFKUNDNROK5=:KDFKUNDNROK5,"
                    + "KDFADROK5=:KDFADROK5,"
                    + "KDFRUN5=:KDFRUN5,"
                    + "KDFFSATZ5=:KDFFSATZ5,"
                    + "KDFMAIL5=:KDFMAIL5,"
                    + "KDFMAILTXT5=:KDFMAILTXT5,"
                    + "KDFDR5=:KDFDR5,"
                    + "KDFFORM5=:KDFFORM5,"
                    + "KDFFORMULAR5=:KDFFORMULAR5,"
                    + "KDFPROGRAMM5=:KDFPROGRAMM5,"
                    + "KDFFOLGEKZ5=:KDFFOLGEKZ5,"
                    + "KDFUSERGR5=:KDFUSERGR5,"
                    + "KDFADRFKZ5=:KDFADRFKZ5,"
                    + "KDFSPRKZ5=:KDFSPRKZ5,"
                    + "KDFANZOK6=:KDFANZOK6,"
                    + "KDFKUNDNROK6=:KDFKUNDNROK6,"
                    + "KDFADROK6=:KDFADROK6,"
                    + "KDFRUN6=:KDFRUN6,"
                    + "KDFFSATZ6=:KDFFSATZ6,"
                    + "KDFMAIL6=:KDFMAIL6,"
                    + "KDFMAILTXT6=:KDFMAILTXT6,"
                    + "KDFDR6=:KDFDR6,"
                    + "KDFFORM6=:KDFFORM6,"
                    + "KDFFORMULAR6=:KDFFORMULAR6,"
                    + "KDFPROGRAMM6=:KDFPROGRAMM6,"
                    + "KDFFOLGEKZ6=:KDFFOLGEKZ6,"
                    + "KDFUSERGR6=:KDFUSERGR6,"
                    + "KDFADRFKZ6=:KDFADRFKZ6,"
                    + "KDFSPRKZ6=:KDFSPRKZ6,"
                    + "KDFANZOK7=:KDFANZOK7,"
                    + "KDFKUNDNROK7=:KDFKUNDNROK7,"
                    + "KDFADROK7=:KDFADROK7,"
                    + "KDFRUN7=:KDFRUN7,"
                    + "KDFFSATZ7=:KDFFSATZ7,"
                    + "KDFMAIL7=:KDFMAIL7,"
                    + "KDFMAILTXT7=:KDFMAILTXT7,"
                    + "KDFDR7=:KDFDR7,"
                    + "KDFFORM7=:KDFFORM7,"
                    + "KDFFORMULAR7=:KDFFORMULAR7,"
                    + "KDFPROGRAMM7=:KDFPROGRAMM7,"
                    + "KDFFOLGEKZ7=:KDFFOLGEKZ7,"
                    + "KDFUSERGR7=:KDFUSERGR7,"
                    + "KDFADRFKZ7=:KDFADRFKZ7,"
                    + "KDFSPRKZ7=:KDFSPRKZ7,"
                    + "KDFANZOK8=:KDFANZOK8,"
                    + "KDFKUNDNROK8=:KDFKUNDNROK8,"
                    + "KDFADROK8=:KDFADROK8,"
                    + "KDFRUN8=:KDFRUN8,"
                    + "KDFFSATZ8=:KDFFSATZ8,"
                    + "KDFMAIL8=:KDFMAIL8,"
                    + "KDFMAILTXT8=:KDFMAILTXT8,"
                    + "KDFDR8=:KDFDR8,"
                    + "KDFFORM8=:KDFFORM8,"
                    + "KDFFORMULAR8=:KDFFORMULAR8,"
                    + "KDFPROGRAMM8=:KDFPROGRAMM8,"
                    + "KDFFOLGEKZ8=:KDFFOLGEKZ8,"
                    + "KDFUSERGR8=:KDFUSERGR8,"
                    + "KDFADRFKZ8=:KDFADRFKZ8,"
                    + "KDFSPRKZ8=:KDFSPRKZ8,"
                    + "KDFANZOK9=:KDFANZOK9,"
                    + "KDFKUNDNROK9=:KDFKUNDNROK9,"
                    + "KDFADROK9=:KDFADROK9,"
                    + "KDFRUN9=:KDFRUN9,"
                    + "KDFFSATZ9=:KDFFSATZ9,"
                    + "KDFMAIL9=:KDFMAIL9,"
                    + "KDFMAILTXT9=:KDFMAILTXT9,"
                    + "KDFDR9=:KDFDR9,"
                    + "KDFFORM9=:KDFFORM9,"
                    + "KDFFORMULAR9=:KDFFORMULAR9,"
                    + "KDFPROGRAMM9=:KDFPROGRAMM9,"
                    + "KDFFOLGEKZ9=:KDFFOLGEKZ9,"
                    + "KDFUSERGR9=:KDFUSERGR9,"
                    + "KDFADRFKZ9=:KDFADRFKZ9,"
                    + "KDFSPRKZ9=:KDFSPRKZ9,"
                    + "KDFOPRDR=:KDFOPRDR,"
                    + "KDFDBLATT=:KDFDBLATT,"
                    + "KDFDRPARAM=:KDFDRPARAM,"
                    + "KDFLAYOUT=:KDFLAYOUT,"
                    + "KDFDRPARAMB=:KDFDRPARAMB,"
                    + "KDFSERIELS=:KDFSERIELS,"
                    + "KDFFILLER=:KDFFILLER,"
                    + "KDFAENZL=:KDFAENZL,"
                    + "KDFAENB=:KDFAENB,"
                    + "KDFAEND=:KDFAEND,"
                    + "KDFNEUB=:KDFNEUB,"
                    + "KDFNEUD=:KDFNEUD "
            #endregion
 + " WHERE KDFMANDANT=:KDFMANDANT AND KDFFORMART=:KDFFORMART AND KDFKUNDNR=:KDFKUNDNR";
            #region====Parameters====
            or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
            or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
            or1.Parameters.Add("KDFVB", OracleType.NVarChar).Value = dwData["KDFVB"].ToString();
            or1.Parameters.Add("KDFVG", OracleType.NVarChar).Value = dwData["KDFVG"].ToString();
            or1.Parameters.Add("KDFLAND", OracleType.NVarChar).Value = dwData["KDFLAND"].ToString();
            or1.Parameters.Add("KDFKUNDNR", OracleType.NVarChar).Value = dwData["KDFKUNDNR"].ToString();
            or1.Parameters.Add("KDFADRSL", OracleType.NVarChar).Value = dwData["KDFADRSL"].ToString();
            or1.Parameters.Add("KDFPROGRP", OracleType.NVarChar).Value = dwData["KDFPROGRP"].ToString();
            or1.Parameters.Add("KDFARTGRP", OracleType.NVarChar).Value = dwData["KDFARTGRP"].ToString();
            or1.Parameters.Add("KDFPOSTYP", OracleType.NVarChar).Value = dwData["KDFPOSTYP"].ToString();
            or1.Parameters.Add("KDFVERSART", OracleType.NVarChar).Value = dwData["KDFVERSART"].ToString();
            or1.Parameters.Add("KDFTAX", OracleType.NVarChar).Value = dwData["KDFTAX"].ToString();
            or1.Parameters.Add("KDFAKKRED", OracleType.NVarChar).Value = dwData["KDFAKKRED"].ToString();
            or1.Parameters.Add("KDFLO", OracleType.NVarChar).Value = dwData["KDFLO"].ToString();
            or1.Parameters.Add("KDFZESSION", OracleType.NVarChar).Value = dwData["KDFZESSION"].ToString();
            or1.Parameters.Add("KDFETIKETT", OracleType.NVarChar).Value = dwData["KDFETIKETT"].ToString();
            or1.Parameters.Add("KDFSERIE", OracleType.NVarChar).Value = dwData["KDFSERIE"].ToString();
            or1.Parameters.Add("KDFPRAEFIX", OracleType.NVarChar).Value = dwData["KDFPRAEFIX"].ToString();
            or1.Parameters.Add("KDFLGLFDNR", OracleType.NVarChar).Value = dwData["KDFLGLFDNR"].ToString();
            or1.Parameters.Add("KDFPRUEFART", OracleType.NVarChar).Value = dwData["KDFPRUEFART"].ToString();
            or1.Parameters.Add("KDFPRFELDLG1", OracleType.NVarChar).Value = dwData["KDFPRFELDLG1"].ToString();
            or1.Parameters.Add("KDFPRFELDKZ1", OracleType.NVarChar).Value = dwData["KDFPRFELDKZ1"].ToString();
            or1.Parameters.Add("KDFPRFELDLG2", OracleType.NVarChar).Value = dwData["KDFPRFELDLG2"].ToString();
            or1.Parameters.Add("KDFPRFELDKZ2", OracleType.NVarChar).Value = dwData["KDFPRFELDKZ2"].ToString();
            or1.Parameters.Add("KDFPRFELDLG3", OracleType.NVarChar).Value = dwData["KDFPRFELDLG3"].ToString();
            or1.Parameters.Add("KDFPRFELDKZ3", OracleType.NVarChar).Value = dwData["KDFPRFELDKZ3"].ToString();
            or1.Parameters.Add("KDFPRFELDLG4", OracleType.NVarChar).Value = dwData["KDFPRFELDLG4"].ToString();
            or1.Parameters.Add("KDFPRFELDKZ4", OracleType.NVarChar).Value = dwData["KDFPRFELDKZ4"].ToString();
            or1.Parameters.Add("KDFPRFELDLG5", OracleType.NVarChar).Value = dwData["KDFPRFELDLG5"].ToString();
            or1.Parameters.Add("KDFPRFELDKZ5", OracleType.NVarChar).Value = dwData["KDFPRFELDKZ5"].ToString();
            or1.Parameters.Add("KDFANZOK1", OracleType.NVarChar).Value = dwData["KDFANZOK1"].ToString();
            or1.Parameters.Add("KDFKUNDNROK1", OracleType.NVarChar).Value = dwData["KDFKUNDNROK1"].ToString();
            or1.Parameters.Add("KDFADROK1", OracleType.NVarChar).Value = dwData["KDFADROK1"].ToString();
            or1.Parameters.Add("KDFRUN1", OracleType.NVarChar).Value = dwData["KDFRUN1"].ToString();
            or1.Parameters.Add("KDFFSATZ1", OracleType.NVarChar).Value = dwData["KDFFSATZ1"].ToString();
            or1.Parameters.Add("KDFMAIL1", OracleType.NVarChar).Value = dwData["KDFMAIL1"].ToString();
            or1.Parameters.Add("KDFMAILTXT1", OracleType.NVarChar).Value = dwData["KDFMAILTXT1"].ToString();
            or1.Parameters.Add("KDFDR1", OracleType.NVarChar).Value = dwData["KDFDR1"].ToString();
            or1.Parameters.Add("KDFFORM1", OracleType.NVarChar).Value = dwData["KDFFORM1"].ToString();
            or1.Parameters.Add("KDFFORMULAR1", OracleType.NVarChar).Value = dwData["KDFFORMULAR1"].ToString();
            or1.Parameters.Add("KDFPROGRAMM1", OracleType.NVarChar).Value = dwData["KDFPROGRAMM1"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ1", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ1"].ToString();
            or1.Parameters.Add("KDFUSERGR1", OracleType.NVarChar).Value = dwData["KDFUSERGR1"].ToString();
            or1.Parameters.Add("KDFADRFKZ1", OracleType.NVarChar).Value = dwData["KDFADRFKZ1"].ToString();
            or1.Parameters.Add("KDFSPRKZ1", OracleType.NVarChar).Value = dwData["KDFSPRKZ1"].ToString();
            or1.Parameters.Add("KDFANZOK2", OracleType.NVarChar).Value = dwData["KDFANZOK2"].ToString();
            or1.Parameters.Add("KDFKUNDNROK2", OracleType.NVarChar).Value = dwData["KDFKUNDNROK2"].ToString();
            or1.Parameters.Add("KDFADROK2", OracleType.NVarChar).Value = dwData["KDFADROK2"].ToString();
            or1.Parameters.Add("KDFRUN2", OracleType.NVarChar).Value = dwData["KDFRUN2"].ToString();
            or1.Parameters.Add("KDFFSATZ2", OracleType.NVarChar).Value = dwData["KDFFSATZ2"].ToString();
            or1.Parameters.Add("KDFMAIL2", OracleType.NVarChar).Value = dwData["KDFMAIL2"].ToString();
            or1.Parameters.Add("KDFMAILTXT2", OracleType.NVarChar).Value = dwData["KDFMAILTXT2"].ToString();
            or1.Parameters.Add("KDFDR2", OracleType.NVarChar).Value = dwData["KDFDR2"].ToString();
            or1.Parameters.Add("KDFFORM2", OracleType.NVarChar).Value = dwData["KDFFORM2"].ToString();
            or1.Parameters.Add("KDFFORMULAR2", OracleType.NVarChar).Value = dwData["KDFFORMULAR2"].ToString();
            or1.Parameters.Add("KDFPROGRAMM2", OracleType.NVarChar).Value = dwData["KDFPROGRAMM2"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ2", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ2"].ToString();
            or1.Parameters.Add("KDFUSERGR2", OracleType.NVarChar).Value = dwData["KDFUSERGR2"].ToString();
            or1.Parameters.Add("KDFADRFKZ2", OracleType.NVarChar).Value = dwData["KDFADRFKZ2"].ToString();
            or1.Parameters.Add("KDFSPRKZ2", OracleType.NVarChar).Value = dwData["KDFSPRKZ2"].ToString();
            or1.Parameters.Add("KDFANZOK3", OracleType.NVarChar).Value = dwData["KDFANZOK3"].ToString();
            or1.Parameters.Add("KDFKUNDNROK3", OracleType.NVarChar).Value = dwData["KDFKUNDNROK3"].ToString();
            or1.Parameters.Add("KDFADROK3", OracleType.NVarChar).Value = dwData["KDFADROK3"].ToString();
            or1.Parameters.Add("KDFRUN3", OracleType.NVarChar).Value = dwData["KDFRUN3"].ToString();
            or1.Parameters.Add("KDFFSATZ3", OracleType.NVarChar).Value = dwData["KDFFSATZ3"].ToString();
            or1.Parameters.Add("KDFMAIL3", OracleType.NVarChar).Value = dwData["KDFMAIL3"].ToString();
            or1.Parameters.Add("KDFMAILTXT3", OracleType.NVarChar).Value = dwData["KDFMAILTXT3"].ToString();
            or1.Parameters.Add("KDFDR3", OracleType.NVarChar).Value = dwData["KDFDR3"].ToString();
            or1.Parameters.Add("KDFFORM3", OracleType.NVarChar).Value = dwData["KDFFORM3"].ToString();
            or1.Parameters.Add("KDFFORMULAR3", OracleType.NVarChar).Value = dwData["KDFFORMULAR3"].ToString();
            or1.Parameters.Add("KDFPROGRAMM3", OracleType.NVarChar).Value = dwData["KDFPROGRAMM3"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ3", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ3"].ToString();
            or1.Parameters.Add("KDFUSERGR3", OracleType.NVarChar).Value = dwData["KDFUSERGR3"].ToString();
            or1.Parameters.Add("KDFADRFKZ3", OracleType.NVarChar).Value = dwData["KDFADRFKZ3"].ToString();
            or1.Parameters.Add("KDFSPRKZ3", OracleType.NVarChar).Value = dwData["KDFSPRKZ3"].ToString();
            or1.Parameters.Add("KDFANZOK4", OracleType.NVarChar).Value = dwData["KDFANZOK4"].ToString();
            or1.Parameters.Add("KDFKUNDNROK4", OracleType.NVarChar).Value = dwData["KDFKUNDNROK4"].ToString();
            or1.Parameters.Add("KDFADROK4", OracleType.NVarChar).Value = dwData["KDFADROK4"].ToString();
            or1.Parameters.Add("KDFRUN4", OracleType.NVarChar).Value = dwData["KDFRUN4"].ToString();
            or1.Parameters.Add("KDFFSATZ4", OracleType.NVarChar).Value = dwData["KDFFSATZ4"].ToString();
            or1.Parameters.Add("KDFMAIL4", OracleType.NVarChar).Value = dwData["KDFMAIL4"].ToString();
            or1.Parameters.Add("KDFMAILTXT4", OracleType.NVarChar).Value = dwData["KDFMAILTXT4"].ToString();
            or1.Parameters.Add("KDFDR4", OracleType.NVarChar).Value = dwData["KDFDR4"].ToString();
            or1.Parameters.Add("KDFFORM4", OracleType.NVarChar).Value = dwData["KDFFORM4"].ToString();
            or1.Parameters.Add("KDFFORMULAR4", OracleType.NVarChar).Value = dwData["KDFFORMULAR4"].ToString();
            or1.Parameters.Add("KDFPROGRAMM4", OracleType.NVarChar).Value = dwData["KDFPROGRAMM4"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ4", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ4"].ToString();
            or1.Parameters.Add("KDFUSERGR4", OracleType.NVarChar).Value = dwData["KDFUSERGR4"].ToString();
            or1.Parameters.Add("KDFADRFKZ4", OracleType.NVarChar).Value = dwData["KDFADRFKZ4"].ToString();
            or1.Parameters.Add("KDFSPRKZ4", OracleType.NVarChar).Value = dwData["KDFSPRKZ4"].ToString();
            or1.Parameters.Add("KDFANZOK5", OracleType.NVarChar).Value = dwData["KDFANZOK5"].ToString();
            or1.Parameters.Add("KDFKUNDNROK5", OracleType.NVarChar).Value = dwData["KDFKUNDNROK5"].ToString();
            or1.Parameters.Add("KDFADROK5", OracleType.NVarChar).Value = dwData["KDFADROK5"].ToString();
            or1.Parameters.Add("KDFRUN5", OracleType.NVarChar).Value = dwData["KDFRUN5"].ToString();
            or1.Parameters.Add("KDFFSATZ5", OracleType.NVarChar).Value = dwData["KDFFSATZ5"].ToString();
            or1.Parameters.Add("KDFMAIL5", OracleType.NVarChar).Value = dwData["KDFMAIL5"].ToString();
            or1.Parameters.Add("KDFMAILTXT5", OracleType.NVarChar).Value = dwData["KDFMAILTXT5"].ToString();
            or1.Parameters.Add("KDFDR5", OracleType.NVarChar).Value = dwData["KDFDR5"].ToString();
            or1.Parameters.Add("KDFFORM5", OracleType.NVarChar).Value = dwData["KDFFORM5"].ToString();
            or1.Parameters.Add("KDFFORMULAR5", OracleType.NVarChar).Value = dwData["KDFFORMULAR5"].ToString();
            or1.Parameters.Add("KDFPROGRAMM5", OracleType.NVarChar).Value = dwData["KDFPROGRAMM5"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ5", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ5"].ToString();
            or1.Parameters.Add("KDFUSERGR5", OracleType.NVarChar).Value = dwData["KDFUSERGR5"].ToString();
            or1.Parameters.Add("KDFADRFKZ5", OracleType.NVarChar).Value = dwData["KDFADRFKZ5"].ToString();
            or1.Parameters.Add("KDFSPRKZ5", OracleType.NVarChar).Value = dwData["KDFSPRKZ5"].ToString();
            or1.Parameters.Add("KDFANZOK6", OracleType.NVarChar).Value = dwData["KDFANZOK6"].ToString();
            or1.Parameters.Add("KDFKUNDNROK6", OracleType.NVarChar).Value = dwData["KDFKUNDNROK6"].ToString();
            or1.Parameters.Add("KDFADROK6", OracleType.NVarChar).Value = dwData["KDFADROK6"].ToString();
            or1.Parameters.Add("KDFRUN6", OracleType.NVarChar).Value = dwData["KDFRUN6"].ToString();
            or1.Parameters.Add("KDFFSATZ6", OracleType.NVarChar).Value = dwData["KDFFSATZ6"].ToString();
            or1.Parameters.Add("KDFMAIL6", OracleType.NVarChar).Value = dwData["KDFMAIL6"].ToString();
            or1.Parameters.Add("KDFMAILTXT6", OracleType.NVarChar).Value = dwData["KDFMAILTXT6"].ToString();
            or1.Parameters.Add("KDFDR6", OracleType.NVarChar).Value = dwData["KDFDR6"].ToString();
            or1.Parameters.Add("KDFFORM6", OracleType.NVarChar).Value = dwData["KDFFORM6"].ToString();
            or1.Parameters.Add("KDFFORMULAR6", OracleType.NVarChar).Value = dwData["KDFFORMULAR6"].ToString();
            or1.Parameters.Add("KDFPROGRAMM6", OracleType.NVarChar).Value = dwData["KDFPROGRAMM6"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ6", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ6"].ToString();
            or1.Parameters.Add("KDFUSERGR6", OracleType.NVarChar).Value = dwData["KDFUSERGR6"].ToString();
            or1.Parameters.Add("KDFADRFKZ6", OracleType.NVarChar).Value = dwData["KDFADRFKZ6"].ToString();
            or1.Parameters.Add("KDFSPRKZ6", OracleType.NVarChar).Value = dwData["KDFSPRKZ6"].ToString();
            or1.Parameters.Add("KDFANZOK7", OracleType.NVarChar).Value = dwData["KDFANZOK7"].ToString();
            or1.Parameters.Add("KDFKUNDNROK7", OracleType.NVarChar).Value = dwData["KDFKUNDNROK7"].ToString();
            or1.Parameters.Add("KDFADROK7", OracleType.NVarChar).Value = dwData["KDFADROK7"].ToString();
            or1.Parameters.Add("KDFRUN7", OracleType.NVarChar).Value = dwData["KDFRUN7"].ToString();
            or1.Parameters.Add("KDFFSATZ7", OracleType.NVarChar).Value = dwData["KDFFSATZ7"].ToString();
            or1.Parameters.Add("KDFMAIL7", OracleType.NVarChar).Value = dwData["KDFMAIL7"].ToString();
            or1.Parameters.Add("KDFMAILTXT7", OracleType.NVarChar).Value = dwData["KDFMAILTXT7"].ToString();
            or1.Parameters.Add("KDFDR7", OracleType.NVarChar).Value = dwData["KDFDR7"].ToString();
            or1.Parameters.Add("KDFFORM7", OracleType.NVarChar).Value = dwData["KDFFORM7"].ToString();
            or1.Parameters.Add("KDFFORMULAR7", OracleType.NVarChar).Value = dwData["KDFFORMULAR7"].ToString();
            or1.Parameters.Add("KDFPROGRAMM7", OracleType.NVarChar).Value = dwData["KDFPROGRAMM7"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ7", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ7"].ToString();
            or1.Parameters.Add("KDFUSERGR7", OracleType.NVarChar).Value = dwData["KDFUSERGR7"].ToString();
            or1.Parameters.Add("KDFADRFKZ7", OracleType.NVarChar).Value = dwData["KDFADRFKZ7"].ToString();
            or1.Parameters.Add("KDFSPRKZ7", OracleType.NVarChar).Value = dwData["KDFSPRKZ7"].ToString();
            or1.Parameters.Add("KDFANZOK8", OracleType.NVarChar).Value = dwData["KDFANZOK8"].ToString();
            or1.Parameters.Add("KDFKUNDNROK8", OracleType.NVarChar).Value = dwData["KDFKUNDNROK8"].ToString();
            or1.Parameters.Add("KDFADROK8", OracleType.NVarChar).Value = dwData["KDFADROK8"].ToString();
            or1.Parameters.Add("KDFRUN8", OracleType.NVarChar).Value = dwData["KDFRUN8"].ToString();
            or1.Parameters.Add("KDFFSATZ8", OracleType.NVarChar).Value = dwData["KDFFSATZ8"].ToString();
            or1.Parameters.Add("KDFMAIL8", OracleType.NVarChar).Value = dwData["KDFMAIL8"].ToString();
            or1.Parameters.Add("KDFMAILTXT8", OracleType.NVarChar).Value = dwData["KDFMAILTXT8"].ToString();
            or1.Parameters.Add("KDFDR8", OracleType.NVarChar).Value = dwData["KDFDR8"].ToString();
            or1.Parameters.Add("KDFFORM8", OracleType.NVarChar).Value = dwData["KDFFORM8"].ToString();
            or1.Parameters.Add("KDFFORMULAR8", OracleType.NVarChar).Value = dwData["KDFFORMULAR8"].ToString();
            or1.Parameters.Add("KDFPROGRAMM8", OracleType.NVarChar).Value = dwData["KDFPROGRAMM8"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ8", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ8"].ToString();
            or1.Parameters.Add("KDFUSERGR8", OracleType.NVarChar).Value = dwData["KDFUSERGR8"].ToString();
            or1.Parameters.Add("KDFADRFKZ8", OracleType.NVarChar).Value = dwData["KDFADRFKZ8"].ToString();
            or1.Parameters.Add("KDFSPRKZ8", OracleType.NVarChar).Value = dwData["KDFSPRKZ8"].ToString();
            or1.Parameters.Add("KDFANZOK9", OracleType.NVarChar).Value = dwData["KDFANZOK9"].ToString();
            or1.Parameters.Add("KDFKUNDNROK9", OracleType.NVarChar).Value = dwData["KDFKUNDNROK9"].ToString();
            or1.Parameters.Add("KDFADROK9", OracleType.NVarChar).Value = dwData["KDFADROK9"].ToString();
            or1.Parameters.Add("KDFRUN9", OracleType.NVarChar).Value = dwData["KDFRUN9"].ToString();
            or1.Parameters.Add("KDFFSATZ9", OracleType.NVarChar).Value = dwData["KDFFSATZ9"].ToString();
            or1.Parameters.Add("KDFMAIL9", OracleType.NVarChar).Value = dwData["KDFMAIL9"].ToString();
            or1.Parameters.Add("KDFMAILTXT9", OracleType.NVarChar).Value = dwData["KDFMAILTXT9"].ToString();
            or1.Parameters.Add("KDFDR9", OracleType.NVarChar).Value = dwData["KDFDR9"].ToString();
            or1.Parameters.Add("KDFFORM9", OracleType.NVarChar).Value = dwData["KDFFORM9"].ToString();
            or1.Parameters.Add("KDFFORMULAR9", OracleType.NVarChar).Value = dwData["KDFFORMULAR9"].ToString();
            or1.Parameters.Add("KDFPROGRAMM9", OracleType.NVarChar).Value = dwData["KDFPROGRAMM9"].ToString();
            or1.Parameters.Add("KDFFOLGEKZ9", OracleType.NVarChar).Value = dwData["KDFFOLGEKZ9"].ToString();
            or1.Parameters.Add("KDFUSERGR9", OracleType.NVarChar).Value = dwData["KDFUSERGR9"].ToString();
            or1.Parameters.Add("KDFADRFKZ9", OracleType.NVarChar).Value = dwData["KDFADRFKZ9"].ToString();
            or1.Parameters.Add("KDFSPRKZ9", OracleType.NVarChar).Value = dwData["KDFSPRKZ9"].ToString();
            or1.Parameters.Add("KDFOPRDR", OracleType.NVarChar).Value = dwData["KDFOPRDR"].ToString();
            or1.Parameters.Add("KDFDBLATT", OracleType.NVarChar).Value = dwData["KDFDBLATT"].ToString();
            or1.Parameters.Add("KDFDRPARAM", OracleType.NVarChar).Value = dwData["KDFDRPARAM"].ToString();
            or1.Parameters.Add("KDFLAYOUT", OracleType.NVarChar).Value = dwData["KDFLAYOUT"].ToString();
            or1.Parameters.Add("KDFDRPARAMB", OracleType.NVarChar).Value = dwData["KDFDRPARAMB"].ToString();
            or1.Parameters.Add("KDFSERIELS", OracleType.NVarChar).Value = dwData["KDFSERIELS"].ToString();
            or1.Parameters.Add("KDFFILLER", OracleType.NVarChar).Value = dwData["KDFFILLER"].ToString();
            or1.Parameters.Add("KDFAENZL", OracleType.NVarChar).Value = dwData["KDFAENZL"].ToString();
            or1.Parameters.Add("KDFAENB", OracleType.NVarChar).Value = dwData["KDFAENB"].ToString();
            or1.Parameters.Add("KDFAEND", OracleType.NVarChar).Value = dwData["KDFAEND"].ToString();
            or1.Parameters.Add("KDFNEUB", OracleType.NVarChar).Value = dwData["KDFNEUB"].ToString();
            or1.Parameters.Add("KDFNEUD", OracleType.NVarChar).Value = dwData["KDFNEUD"].ToString();
            #endregion

            Connect2Proxy(or1);
        }
    }
}
